package com.zmis.system.config;

import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;

public class SystemSetting {
	private static Properties properties = new Properties();
	private static Logger log = Logger.getLogger(SystemSetting.class);
	
	static {
		try {
			properties.load(SystemSetting.class.getClassLoader().getResourceAsStream("com/zmis/config/systemsetting.properties"));
		} catch (IOException e) {
			e.printStackTrace();
			log.error("---------文件找不到------------");
			e.printStackTrace();
		}
	}

	public static Object getValueByKey(String key) {
		return properties.get(key);
	}
	/**
	 * 是否包含key
	 * @param key
	 * @return
	 */
	public static boolean isContainsKey(String key) {
		return properties.containsKey(key);
	}
	
	/**
	 * 是否包含value
	 * @param value
	 * @return
	 */
	public static boolean isContainsValue(String value) {
		return properties.containsValue(value);
	}
}
